<!-- 
debugDumpParams()方法打印输出一条预处理语句 

-->

<?php 

try {
	$pdo = new PDO('mysql:host=localhost; dbname=exercise', 'root', 'root');
	$sql = 'insert user(username, password, email) values(?,?,?)';
	$stmt = $pdo->prepare($sql);
	$stmt->bindParam(1, $username, PDO::PARAM_STR);
	$stmt->bindParam(2, $password, PDO::PARAM_STR);
	$stmt->bindParam(3, $email, PDO::PARAM_STR);
	$username = 'zhangyifan';
	$passeord = 'zhangyifan123';
	$email = 'zhangyifan@zx.com';
	$stmt->execute();

	$stmt->debugDumpParams();

} catch (PDOException $e) {
	$e->getMessage();
}


 ?>